package com.mooc.yohoshop.widget;

import android.content.Context;
import android.graphics.Color;
import androidx.annotation.Nullable;

import com.blankj.utilcode.util.LogUtils;
import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;

public class HomeGoodsDivider extends Y_DividerItemDecoration {

    public HomeGoodsDivider(Context context) {
        super(context);
    }

    @Nullable
    @Override
    public Y_Divider getDivider(int itemPosition) {
        Y_Divider divider = null;
        if (itemPosition%2!=0){
            divider =  new Y_DividerBuilder()
                    .setRightSideLine(true, 0xffffffff, 10, 0, 0)
                    .setBottomSideLine(true, 0xffffffff, 3, 0, 0).create();
        }else {
            divider =  new Y_DividerBuilder()
                    .setBottomSideLine(true, 0xffffffff, 3, 0, 0).create();
        }
        return divider;
    }
}
